home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-11-10 | 23.9 KB | 1,042 lines |
- ;Install script for WebPlug version 1.2 © 1996 Esteve Boix
- ;This install script is © Bo Liljegren (bosse@algonet.se)
-
- (complete 0)
-
- ;Pure sequrity. If the Installer, by some strange reason,
- ; can't find the default language, it will use english
- (set default_lang 2)
-
- ;=============================================================================
- ; Catalan strings
-
- (if (= @language "català")
- (
- (set default_lang 1)
-
- (set #low-user-level
- (cat "\nLa instal.lació de WebPlug requereix com a mínim un nivell \"Mig\" d'usuari.\n\n"
- "Reengega la instal.lació i selecciona un nivell apropiat."
- ))
-
- (set #ask-upgrade
- (cat "\nÉs una nova instal.lació o un upgrade ?\n\n"
- "Upgrade vol dir reinstal.lar."
- ))
-
- (set #upgr-choice-upgr
- (cat "Un upgrade"
- ))
-
- (set #upgr-choice-new
- (cat "Nova instal.lació"
- ))
-
- (set #which-oldfile
- (cat "On és el programa WebPlug ?\n(El programa, no el directori)"
- ))
-
- (set #mess-oldinstaller1
- (cat "\nEstás usant una versió antiga del programa Installer\n(%ld.%ld)\n\n"
- ))
-
- (set #mess-oldinstaller2
- (cat "Usa una versió més nova"
- ))
-
- (set #mess-obsoletekick
- (cat "WebPlug requereix AmigaDOS versió 2.0 o superior.\nLa versió 3.0+ és molt recomanable"
- ))
-
- (set #mess-nomui
- (cat "\nWebPlug requereix el MUI.\nNo he trobar la muimaster.library.\n\n"
- "Ho sento. No puc continuar amb la instal.lació"
- ))
-
- (set #mess-oldmui
- (cat "\nWebPlug requireix el MUI 3.2+.\n\n"
- "Això es la muimaster.library ver 13.686\n"
- "Tens la versió %ld.%ld\n\n"
- "Ho sento. No puc seguir amb la instal.lació."
- ))
-
- (set #which-directory
- (cat "On vols instal.lar el WebPlug ?\n(Es crearà un directori \"WebPlug\")"
- ))
-
- (set #confirm-adddocs
- (cat "\n\nVols copiar la documentació (HTML) ?"
- ))
-
- (set #confirm-custom-dirs
- (cat "\n\nVols instal.lar els directoris CustomTags i CustomStrings ?"
- ))
-
- (set #which-language
- (cat "Quins catàlegs vols instal.lar ?"
- ))
-
- (set #prompt-makemaindir
- (cat "Vaig a crear el directori WebPlug"
- ))
-
- (set #prompt-copybrowserlinks
- (cat "Vaig a copiar el directori BrowserLinks"
- ))
-
- (set #prompt-adddocs
- (cat "Vaig a copiar la documentació HTML"
- ))
-
- (set #prompt-textfieldgadgetKS3
- (cat "Vaig a instal.lar el Textfield.gadget (OS v3.0+)"
- ))
-
- (set #prompt-textfieldgadgetKS2
- (cat "Vaig a instal.lar el Textfield.gadget (OS v2.0+)"
- ))
-
- (set #prompt-customtags
- (cat "Vaig a copiar el directori CustomTags"
- ))
-
- (set #prompt-customstrings
- (cat "Vaig a copiar el directori CustomStrings"
- ))
-
- (set #prompt-executable
- (cat "Vaig a copiar l'executable del WebPlug"
- ))
-
- (set #mess-congra
- (cat "\nEnhorabona, WebPlug ja està instal.lat.\n\n"
- ))
-
- (set #mess-docsfound
- (cat "La documentació és en format HTML, la\n"
- "pots trobar al directori \"%s\"\n"
- "Usa el teu navegador preferit per llegirla.\n"
- "Comença amb el document \"WebPlug.html\"\n\n"
- ))
-
- (set #mess-shareware
- (cat "WebPlug és Shareware.\n"
- "El registre són només $10 de forma que si us plau\n"
- "considera registrarte si l'uses.\n\n"
- "Que el disfrutis !"
- ))
-
- ))
-
- ;=============================================================================
- ; English strings
-
- (if (= @language "english")
- (
- (set default_lang 2)
-
- (set #low-user-level
- (cat "\nWebPlug installation requires at least the \"Average\" user level.\n\n"
- "Restart installation and select appropriate user level."
- ))
-
- (set #ask-upgrade
- (cat "\nIs this a new installation or\n"
- "an upgrade?\n\n"
- "A reinstallation is equal an upgrade"
- ))
-
- (set #upgr-choice-upgr
- (cat "An upgrade"
- ))
-
- (set #upgr-choice-new
- (cat "New installation"
- ))
-
- (set #which-oldfile
- (cat "\nWhere is the programme WebPlug?\n(The programme, NOT the directory WebPlug)\n"
- ))
-
- (set #mess-oldinstaller1
- (cat "\nYou are using an old version\nof the Installer programme. (%ld.%ld)\n\n"
- ))
-
- (set #mess-oldinstaller2
- (cat "Please use the included Installer"
- ))
-
- (set #mess-obsoletekick
- (cat "WebPlug requires AmigaDOS version 2.0 or higher\nVersion 3.0+ is strongly recommended."
- ))
-
- (set #mess-nomui
- (cat "\nWebPlug requires MUI.\nNo muimaster.library is found.\n\n"
- "Sorry, can not continue the installation"
- ))
-
- (set #mess-oldmui
- (cat "\nWebPlug requires MUI version 3.2 or higher.\n\n"
- "That means muimaster.library ver 13.686\n"
- "You have version %ld.%ld\n\n"
- "Sorry, can not continue the installation"
- ))
-
- (set #which-directory
- (cat "Where do you want to install WebPlug ?\n(A drawer named \"WebPlug\" WILL be created)"
- ))
-
- (set #confirm-adddocs
- (cat "\n\nWould you like to install the (HTML) documentation?"
- ))
-
- (set #confirm-custom-dirs
- (cat "\n\nWould you like to install the CustomTags and CustomStrings directories?"
- ))
-
- (set #which-language
- (cat "\nWhich languages should be installed?\n(english is built-in)"
- ))
-
- (set #prompt-makemaindir
- (cat "Going to create WebPlug's dir"
- ))
-
- (set #prompt-copybrowserlinks
- (cat "Going to copy the BrowserLinks dir"
- ))
-
- (set #prompt-adddocs
- (cat "Going to copy the (HTML) documentation"
- ))
-
- (set #prompt-textfieldgadgetKS3
- (cat "About to install the Textfield.gadget (OS v3.0+)"
- ))
-
- (set #prompt-textfieldgadgetKS2
- (cat "About to install the Textfield.gadget (OS v2.0+)"
- ))
-
- (set #prompt-customtags
- (cat "About to install the CustomTags directory"
- ))
-
- (set #prompt-customstrings
- (cat "About to install the CustomStrings directory"
- ))
-
- (set #prompt-executable
- (cat "Going to copy WebPlug's executable"
- ))
-
- (set #mess-congra
- (cat "\nCongratulations, WebPlug is now installed.\n\n"
- ))
-
- (set #mess-docsfound
- (cat "The documentation is in html format and\n"
- "can be found in the directory \"%s\"\n"
- "Please used your favorite browser to read it.\n"
- "Start with the document \"WebPlug.html\"\n\n"
- ))
-
- (set #mess-shareware
- (cat "WebPlug is released as Shareware.\n"
- "The fee is only $10, so please consider\n"
- "registering it if you use it.\n\n"
- "Enjoy!"
- ))
-
- ))
-
- ;=============================================================================
- ; Spanish strings
-
- (if (= @language "español")
- (
- (set default_lang 4)
-
- (set #low-user-level
- (cat "\nLa instalación de WebPlug requiere como mínimo un nivel \"Medio\" de usuario.\n\n"
- "Reinicia la instalación y elije el nivel adecuado."
- ))
-
- (set #ask-upgrade
- (cat "\nEsto es una instalación o un upgrade ?\n"
- "Una reinstalación es un upgrade"
- ))
-
- (set #upgr-choice-upgr
- (cat "Un upgrade"
- ))
-
- (set #upgr-choice-new
- (cat "Nueva instalación"
- ))
-
- (set #which-oldfile
- (cat "\nDónde está el programa WebPlug?\n(El programa, no el directorio)\n"
- ))
-
- (set #mess-oldinstaller1
- (cat "\nEstás usando una versión antigua del Installer\n(%ld.%ld)\n\n"
- ))
-
- (set #mess-oldinstaller2
- (cat "Usa una versión más nueva"
- ))
-
- (set #mess-obsoletekick
- (cat "WebPlug requiere el AmigaDOS versión 2.0 o superior\nLa versión 3.0+ es muy recomendable."
- ))
-
- (set #mess-nomui
- (cat "\nWebPlug requiriere el MUI.\nNo he encontrado la muimaster.library.\n\n"
- "Lo siento. No puedo seguir con la instalación"
- ))
-
- (set #mess-oldmui
- (cat "WebPlug requiere el MUI 3.2+.\n\n"
- "Esto significa la muimaster.library ver 13.686\n"
- "Tu tienes la %ld.%ld\n\n"
- "Lo siento. No puedo seguir con la instalación"
- ))
-
- (set #which-directory
- (cat "Dónde quieres instalar WebPlug ?\n(SE CREARÁ un directorio \"WebPlug\")"
- ))
-
- (set #confirm-adddocs
- (cat "\n\nQuieres copiar la documentación (HTML) ?"
- ))
-
- ;NEW_1.2!!!
- (set #confirm-custom-dirs
- (cat "\n\nWould you like to install the CustomTags and CustomStrings directories?"
- ))
-
- (set #which-language
- ; stolen from WB3.1 intall
- (cat "\n¿Qué idioma quiere instalar?"
- ; original
- ;(cat "Qué catálogos quieres instalar ?"
- ))
-
- (set #prompt-makemaindir
- (cat "Voy a crear el directorio de WebPlug"
- ))
-
- (set #prompt-copybrowserlinks
- (cat "Voy a copiar el directorio de BrowserLinks"
- ))
-
- (set #prompt-adddocs
- (cat "Voy a copiar la documentación HTML"
- ))
-
- (set #prompt-textfieldgadgetKS3
- (cat "Voy a instalar el Textfield.gadget (OS v3.0+)"
- ))
-
- (set #prompt-textfieldgadgetKS2
- (cat "Voy a instalar el Textfield.gadget (OS v2.0+)"
- ))
-
- (set #prompt-customtags
- (cat "Voy a instalar el directori CustomTags"
- ))
-
- (set #prompt-customstrings
- (cat "Voy a instalar el directori CustomStrings"
- ))
-
- (set #prompt-executable
- (cat "Voy a copiar el programa de WebPlug"
- ))
-
- (set #mess-congra
- (cat "\nEnhorabuena, WebPlug ya está instalado.\n\n"
- ))
-
- (set #mess-docsfound
- (cat "La documentación está en formato HTML y\n"
- "la puedes encontrar en el directorio \"%s\"\n"
- "Por favor, usa tu navegador favorito para leerla.\n"
- "Empieza con el documento \"WebPlug.html\"\n\n"
- ))
-
- (set #mess-shareware
- (cat "WebPlug es Shareware.\n"
- "El registro son solo $10, así que por favor\n"
- "considera registrarte si lo usas.\n\n"
- "Que lo disfrutes !"
- ))
-
- ))
-
- ;=============================================================================
- ; Italian strings
-
- (if (= @language "italiano")
- (
- (set default_lang 8)
-
- (set #low-user-level
- (cat "\nWebPlug installation requires at least the \"Average\" user level.\n\n"
- "Restart installation and select appropriate user level."
- ))
-
- (set #ask-upgrade
- (cat "\nIs this a new installation or\n"
- "an upgrade?\n\n"
- "A reinstallation is equal an upgrade"
- ))
-
- (set #upgr-choice-upgr
- (cat "An upgrade"
- ))
-
- (set #upgr-choice-new
- (cat "New installation"
- ))
-
- (set #which-oldfile
- (cat "\nWhere is the programme WebPlug?\n(The programme, NOT the directory WebPlug)\n"
- ))
-
- (set #mess-oldinstaller1
- (cat "\nYou are using an old version\nof the Installer programme. (%ld.%ld)\n\n"
- ))
-
- (set #mess-oldinstaller2
- (cat "Please use the included Installer"
- ))
-
- (set #mess-obsoletekick
- (cat "WebPlug requires AmigaDOS version 2.0 or higher\nVersion 3.0+ is strongly recommended."
- ))
-
- (set #mess-nomui
- (cat "\nWebPlug requires MUI.\nNo muimaster.library is found.\n\n"
- "Sorry, can not continue the installation"
- ))
-
- (set #mess-oldmui
- (cat "\nWebPlug requires MUI version 3.2 or higher.\n\n"
- "That means muimaster.library ver 13.686\n"
- "You have version %ld.%ld\n\n"
- "Sorry, can not continue the installation"
- ))
-
- (set #which-directory
- (cat "Where do you want to install WebPlug ?\n(A drawer named \"WebPlug\" WILL be created)"
- ))
-
- (set #confirm-adddocs
- (cat "\n\nWould you like to install the (HTML) documentation?"
- ))
-
- (set #confirm-custom-dirs
- (cat "\n\nWould you like to install the CustomTags and CustomStrings directories?"
- ))
-
- (set #which-language
- (cat "\nWhich languages should be installed?\n(english is built-in)"
- ))
-
- (set #prompt-makemaindir
- (cat "Going to create WebPlug's dir"
- ))
-
- (set #prompt-copybrowserlinks
- (cat "Going to copy the BrowserLinks dir"
- ))
-
- (set #prompt-adddocs
- (cat "Going to copy the (HTML) documentation"
- ))
-
- (set #prompt-textfieldgadgetKS3
- (cat "About to install the Textfield.gadget (OS v3.0+)"
- ))
-
- (set #prompt-textfieldgadgetKS2
- (cat "About to install the Textfield.gadget (OS v2.0+)"
- ))
-
- (set #prompt-customtags
- (cat "About to install the CustomTags directory"
- ))
-
- (set #prompt-customstrings
- (cat "About to install the CustomStrings directory"
- ))
-
- (set #prompt-executable
- (cat "Going to copy WebPlug's executable"
- ))
-
- (set #mess-congra
- (cat "\nCongratulations, WebPlug is now installed.\n\n"
- ))
-
- (set #mess-docsfound
- (cat "The documentation is in html format and\n"
- "can be found in the directory \"%s\"\n"
- "Please used your favorite browser to read it.\n"
- "Start with the document \"WebPlug.html\"\n\n"
- ))
-
- (set #mess-shareware
- (cat "WebPlug is released as Shareware.\n"
- "The fee is only $10, so please consider\n"
- "registering it if you use it.\n\n"
- "Enjoy!"
- ))
-
- ))
-
- ;=============================================================================
- ; Portuguese strings
-
- (if (= @language "português")
- (
- (set default_lang 16)
-
- (set #low-user-level
- (cat "\nWebPlug installation requires at least the \"Average\" user level.\n\n"
- "Restart installation and select appropriate user level."
- ))
-
- (set #ask-upgrade
- (cat "\nIs this a new installation or\n"
- "an upgrade?\n\n"
- "A reinstallation is equal an upgrade"
- ))
-
- (set #upgr-choice-upgr
- (cat "An upgrade"
- ))
-
- (set #upgr-choice-new
- (cat "New installation"
- ))
-
- (set #which-oldfile
- (cat "\nWhere is the programme WebPlug?\n(The programme, NOT the directory WebPlug)\n"
- ))
-
- (set #mess-oldinstaller1
- (cat "\nYou are using an old version\nof the Installer programme. (%ld.%ld)\n\n"
- ))
-
- (set #mess-oldinstaller2
- (cat "Please use the included Installer"
- ))
-
- (set #mess-obsoletekick
- (cat "WebPlug requires AmigaDOS version 2.0 or higher\nVersion 3.0+ is strongly recommended."
- ))
-
- (set #mess-nomui
- (cat "\nWebPlug requires MUI.\nNo muimaster.library is found.\n\n"
- "Sorry, can not continue the installation"
- ))
-
- (set #mess-oldmui
- (cat "\nWebPlug requires MUI version 3.2 or higher.\n\n"
- "That means muimaster.library ver 13.686\n"
- "You have version %ld.%ld\n\n"
- "Sorry, can not continue the installation"
- ))
-
- (set #which-directory
- (cat "Where do you want to install WebPlug ?\n(A drawer named \"WebPlug\" WILL be created)"
- ))
-
- (set #confirm-adddocs
- (cat "\n\nWould you like to install the (HTML) documentation?"
- ))
-
- ;NEW_1.2!!!
- (set #confirm-custom-dirs
- (cat "\n\nWould you like to install the CustomTags and CustomStrings directories?"
- ))
-
- (set #which-language
- (cat "\nWhich languages should be installed?\n(english is built-in)"
- ))
-
- (set #prompt-makemaindir
- (cat "Going to create WebPlug's dir"
- ))
-
- (set #prompt-copybrowserlinks
- (cat "Going to copy the BrowserLinks dir"
- ))
-
- (set #prompt-adddocs
- (cat "Going to copy the (HTML) documentation"
- ))
-
- (set #prompt-textfieldgadgetKS3
- (cat "About to install the Textfield.gadget (OS v3.0+)"
- ))
-
- (set #prompt-textfieldgadgetKS2
- (cat "About to install the Textfield.gadget (OS v2.0+)"
- ))
-
- ;NEW_1.2!!!
- (set #prompt-customtags
- (cat "About to install the CustomTags directory"
- ))
-
- ;NEW_1.2!!!
- (set #prompt-customstrings
- (cat "About to install the CustomStrings directory"
- ))
-
- (set #prompt-executable
- (cat "Going to copy WebPlug's executable"
- ))
-
- (set #mess-congra
- (cat "\nCongratulations, WebPlug is now installed.\n\n"
- ))
-
- (set #mess-docsfound
- (cat "The documentation is in html format and\n"
- "can be found in the directory \"%s\"\n"
- "Please used your favorite browser to read it.\n"
- "Start with the document \"WebPlug.html\"\n\n"
- ))
-
- (set #mess-shareware
- (cat "WebPlug is released as Shareware.\n"
- "The fee is only $10, so please consider\n"
- "registering it if you use it.\n\n"
- "Enjoy!"
- ))
-
- ))
-
- ;=============================================================================
- ; Swedish strings
-
- (if (= @language "svenska")
- (
- (set default_lang 32)
-
- (set #low-user-level
- (cat "\nWebPlug installation kräver minst användarnivån \"Erfaren användare\".\n\n"
- "Starta om installationen och välj en mer passande användarnivå."
- ))
-
- (set #ask-upgrade
- (cat "\nSkall du installera för första gången eller\n"
- "uppgradera för en äldre version?\n\n"
- "En ominstallering av ny version är samma sak som uppgradering"
- ))
-
- (set #upgr-choice-upgr
- (cat "Uppgradering"
- ))
-
- (set #upgr-choice-new
- (cat "Ny installering"
- ))
-
- (set #which-oldfile
- (cat "\nVar finns programmet WebPlug?\n(Observera programmet och inte bara lådan)\n"
- ))
-
- (set #mess-oldinstaller1
- (cat "\nDu använder en gammal version\nav programmet Installer. (%ld.%ld)\n\n"
- ))
-
- (set #mess-oldinstaller2
- (cat "Vänligen använd den Installer som medföljer."
- ))
-
- (set #mess-obsoletekick
- (cat "WebPlug kräver AmigaDOS version 2.0 eller högre\nVersion 3.0+ rekommenderas kraftigt."
- ))
-
- (set #mess-nomui
- (cat "\nWebPlug kräver MUI.\nmuimaster.library kan ej hittas.\n\n"
- "Ledsen, men kan ej fortsätta installationen"
- ))
-
- (set #mess-oldmui
- (cat "\nWebPlug kräver MUI version 3.2 eller högre.\n\n"
- "Mer exakt muimaster.library ver 13.686\n"
- "Du har version %ld.%ld\n\n"
- "Ledsen, men kan ej fortsätta installationen"
- ))
-
- (set #which-directory
- (cat "\nVar vill du installera WebPlug?\n(En låda med namnet \"WebPlug\" kommer att skapas)\n"
- ))
-
- (set #confirm-adddocs
- (cat "\n\nVill du installera dokumentationen?\n"
- "All dokumentation är i HTML-format."
- ))
-
- (set #confirm-custom-dirs
- (cat "\n\nVill du installera katalogerna CustomTags och CustomStrings?"
- ))
-
- (set #which-language
- (cat "\nVilka språk skall installeras?"
- ))
-
- (set #prompt-makemaindir
- (cat "\nSkapar huvudkatalogen för WebPlug"
- ))
-
- (set #prompt-copybrowserlinks
- (cat "\nInstallerar BrowserLinks katalogen"
- ))
-
- (set #prompt-adddocs
- (cat "\nInstallerar dokumentation"
- ))
-
- (set #prompt-textfieldgadgetKS3
- (cat "Installerar Textfield.gadget (OS v3.0+)"
- ))
-
- (set #prompt-textfieldgadgetKS2
- (cat "Installerar Textfield.gadget (OS v2.0+)"
- ))
-
- (set #prompt-customtags
- (cat "Installerar katalogen CustomTags"
- ))
-
- (set #prompt-customstrings
- (cat "Installerar katalogen CustomStrings"
- ))
-
- (set #prompt-executable
- (cat "Installerar WebPlugs exekverbara fil"
- ))
-
- (set #mess-congra
- (cat "\nGratulerar, WebPlug är installerad.\n\n"
- ))
-
- (set #mess-docsfound
- (cat "Dokumentationen är i HTML-format och\n"
- "går att finna i katalogen \"%s\"\n"
- "Vänligen använd din favoritbrowser för att läsa den.\n"
- "Börja med dokumentet \"WebPlug.html\"\n\n"
- ))
-
- (set #mess-shareware
- (cat "WebPlug är släppt som Shareware.\n"
- "Avgiften är endast $10, så överväg att\n"
- "registrera programmet om du använder det.\n\n"
- "Lycka Till!"
- ))
-
- ))
-
- ;=============================================================================
- ; procedure to copy the language catalogs
-
- (procedure P_InstLocale
- (
- (set n 0)
- (while (set #language (select n "català"
- "english"
- "español"
- "italiano"
- "português"
- "svenska"
- "norsk"
- "deutsch"
- ""
- ))
- (
- (if (IN #locales n)
- (
- ;; The english language is built in. No need to install it
- (if (<> 1 n)
- (
- (copyfiles
- (source (tackon "/bin/locale/catalogs/" #language))
- (dest (tackon "LOCALE:Catalogs" #language))
- (all)
- )))))
- (set n (+ n 1))
- ))))
-
- ;========================================================
- ; check user-level
-
- (if (< @user-level 1)
- (abort (#low-user-level @app-name))
- )
-
- ;========================================================
- ; variable setup
-
- (set #installver (/ @installer-version 65536))
- (set #installrev (- @installer-version (* #installver 65536)))
- (set #tempversion (getversion))
- (set #osversion (/ #tempversion 65536))
- (set #osrevision (- #tempversion (* #osversion 65536)))
- (set #adddocs 0)
- (set #frominstdir (pathonly @icon))
- (set #frominstdir (substr #frominstdir 0 (- (strlen #frominstdir) (strlen "/install"))))
-
- ;========================================================
- ; check installer version
-
- (if (< #installver 43)
- (
- (abort (#mess-oldinstaller1 #installver #installrev)
- #mess-oldinstaller2)
- ))
-
- ;========================================================
- ; check kickstart version
-
- (if (< #osversion 37)
- (
- (abort #mess-obsoletekick)
- ))
-
- ;========================================================
- ; check mui (MUI 3.2 = muimaster.library V13.686)
-
- (if (= (exists "LIBS:muimaster.library" (noreq)) 1)
- (
- (set #tempver (getversion "LIBS:muimaster.library"))
- (set #muiver (/ #tempver 65536))
- (set #muirev (- #tempver (* #muiver 65536)))
- (if (< #muiver 13)
- (
- (abort (#mess-oldmui #muiver #muirev))
- )))
- ((abort #mess-nomui))
- )
-
- ;=============================================================================
- ; ask new install or upgrade
-
- (set #b-upgrade
- (askbool
- (prompt #ask-upgrade)
- (help @askbool-help)
- (choices #upgr-choice-upgr #upgr-choice-new)
- )
- )
-
- ;=============================================================================
- ; where should WebPlug be installed
-
- (if (= (exists "Work:" (noreq)) 2)
- (set #def-dest "Work:")
- (set #def-dest "SYS:")
- )
-
- ;-----------------------------------------------
- ; if upgrade, where is the old program?
-
- (if (= 1 #b-upgrade)
- (
- (set #oldprogfile
- (askfile
- (prompt #which-oldfile)
- (help @askdir-help)
- (default #def-dest)
- )
- )
- (set #directory (pathonly (#oldprogfile)))
-
- ;; If Docs directory exists, new documentation will be installed!
- (if (= (exists (tackon #directory "Docs") (noreq)) 2)
- (set #adddocs 1)
- )
- )
-
- ;-----------------------------------------------
- ; else new install
-
- ((set #directory
- (askdir
- (prompt #which-directory)
- (help @askdir-help)
- (default #def-dest)
- ))))
- (complete 10)
-
- ;=============================================================================
- ; should documentation be installed?
-
- (if (OR (= #adddocs 0) (= @user-level 2))
- (
- (set #adddocs
- (askbool
- (prompt #confirm-adddocs)
- (help @askbool-help)
- (default 1)
- ))
- ))
- (complete 20)
-
- ;=============================================================================
- ; should CustomTags and CustomStrins directories be installed?
-
- (
- (set #addcustom
- (askbool
- (prompt #confirm-custom-dirs)
- (help @askbool-help)
- (default 1)
- ))
- )
- (complete 20)
-
- ;=============================================================================
- ; which languages should be installed? Only usefull for WB2.1 or higher
-
- (set #locales
- (askoptions
- (prompt #which-language)
- (help @askoptions-help)
- (choices
- "Català"
- "English"
- "Español"
- "Italiano"
- "Português"
- "Svenska"
- "Norsk"
- "Deutsch"
- )
- (default default_lang)
- )
- )
- (complete 30)
-
- ;=============================================================================
- ; if new installation create the main directory
-
- (if (= 0 #b-upgrade)
- (
- (set @default-dest (tackon #directory "WebPlug"))
- (makedir
- (@default-dest)
- (prompt #prompt-makemaindir)
- (help @makedir-help)
- (infos)
- )
- (complete 40)
- )
- ;-----------------------------------------------
- ; else just set @default-dest
-
- (set @default-dest #directory)
- )
- (complete 50)
-
- ;=============================================================================
- ; copy the BrowserLinks directory
-
- (copyfiles
- (source "/bin/BrowserLinks")
- (dest (tackon @default-dest "BrowserLinks"))
- (prompt #prompt-copybrowserlinks)
- (all)
- (help @copyfiles-help)
- )
- (complete 60)
- ;=============================================================================
- ; copy the (HTML) documentation
- (set #docs-dest (tackon @default-dest "Docs"))
-
- (if (= 1 #adddocs)
- (copyfiles
- (source "/docs")
- (dest #docs-dest)
- (prompt #prompt-adddocs)
- (help @copyfiles-help)
- (all)
- )
- )
- (complete 70)
- ;=============================================================================
- ; copy the CustomTags and CustomStrins directories
- (set #docs-dest (tackon @default-dest "Docs"))
-
- (if (= 1 #adddocs)
- (
- (copyfiles
- (source "/bin/CustomStrings")
- (dest (tackon @default-dest "CustomStrings"))
- (prompt #prompt-customstrings)
- (all)
- (infos)
- (help @copyfiles-help)
- )
- (copyfiles
- (source "/bin/CustomTags")
- (dest (tackon @default-dest "CustomTags"))
- (prompt #prompt-customstags)
- (all)
- (infos)
- (help @copyfiles-help)
- )
- )
- )
- (complete 75)
- ;=============================================================================
- ; install the proper Textfield.gadget SYS:Classes/Gadgets/Textfield.gadget
-
- (if (>= #osversion 39)
- (copylib
- (source "/bin/classes/gadgets/textfield.gadget")
- (dest "SYS:Classes/Gadgets")
- (prompt #prompt-textfieldgadgetKS3)
- )
- (copylib
- (source "/bin/classes/gadgets/textfield.gadget")
- (dest (tackon @default-dest "gadgets"))
- (prompt #prompt-textfieldgadgetKS2)
- )
- )
- (complete 80)
- ;=============================================================================
- ; install executable files for WebPlug
-
- (copyfiles
- (source "/bin/WebPlug")
- (dest @default-dest)
- (prompt #prompt-executable)
- (help @copyfiles-help)
- (infos)
- )
- (complete 90)
-
- ;=============================================================================
- ; procedure to copy the language catalogs
-
- (P_InstLocale)
- (complete 100)
-
- ;=============================================================================
- ; That's it!
-
- (if (= 1 #adddocs)
- (set #exit-text (cat #mess-congra (#mess-docsfound #docs-dest) #mess-shareware))
- (set #exit-text (cat #mess-congra #mess-shareware) )
- )
-
- (exit (#exit-text) )
-